package cn.zcy.controller;

import cn.zcy.domain.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

@Controller
@RequestMapping("/converter")
public class ConverterController {

    @RequestMapping("/test")
    public String test(User user) throws Exception{

        System.out.println("user = " + user);
        return "main";
    }

    public static void main(String[] args) throws Exception {
        DateFormat df = new SimpleDateFormat("yyyy-MM-dd");


        String format = df.format(new Date());
        System.out.println("format = " + format);
    }
}
